var status = -1;
var selectionLog = [];

function start() {
    action(1, 0, 0)
}

function action(d, c, b) {
    if (status == 0 && d == 0) {
        cm.dispose();
        return
    }(d == 1) ? status++ : status--;
    selectionLog[status] = b;
    var a = -1;
    if (status <= a++) {
        cm.dispose()
    } else {
        if (status === a++) {
            cm.askMenu("要回到前哨基地吗？\r\n\r\n#b#L0#回到前哨基地。#l\r\n#L1#现在不回去。", 4, 1540446)
        } else {
            if (status === a++) {
                if (b == 0) {
                    cm.setNumberForQuestCustomData(cm.getNpc(), cm.getMapId());
                    cm.sendOk("已记录下当前的位置。")
                } else {
                    cm.dispose()
                }
            } else {
                cm.warp(993120000, 2, false);
                cm.dispose()
            }
        }
    }
};